<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'add.jsp' starting page</title>
  </head>
  <body>
    <% String code = request.getParameter("code");
    	//这里必须写code != null 否则会出现NullpointerException的执行错误，必须的写
  		if(code != null &&code.equals("10004")){
  	%>
  	 <div style = "color:red">请输入商品信息</div>
  	<%} else if(code != null &&code.equals("10005")){%>
  	 <div style = "color:red">此商品已存在</div>
  	<%} %>
   <form action="save.jspx" method ="post">
   	商品名称：<input type = "text" name="prodname"/>
   	商品价格：<input type = "text" name="prodprice"/>
   		<input type = "submit" value = "提交"/>
   </form>
  </body>
</html>
